# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=templ
pkgver=0.2.501
pkgrel=0
pkgdesc="Language for writing HTML user interface in Go"
url="https://templ.guide/"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/a-h/templ/archive/refs/tags/v$pkgver.tar.gz"

export CGO_ENABLED=0
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v ./cmd/templ
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
dcf420b3f2ae225ce6093efa0df1b01ed440e36b5b2b4ce7dbcabde4fdbf9d1cf8d162d17c0a693274e5d77f3676bb1f4523a8478b6d53bb96cecd71161f1414  templ-0.2.501.tar.gz
"
